<template>  
  <view> 
    <view id="myView">  
      <view>这是父组件传递过来的数据{{title}},{{name}}</view>  
    </view>  
    <view>  
      <button type="primary" @click="sendNum">给父组件传值</button>  
    </view> 
	 
	 <test :title="title" @myEven="getNum"></test>
	 这是子组件传递过来的数据{{num}}
  </view>  
</template>  
  
<script>  
export default {  
  data() {  
    return {  
     num:3,
	 intId:null
    };  
  },  
  props:['title','name'],
  methods: {  
	  getNum(num){
		  console.log(num)
		  this.num=num
	  },
    sendNum() {  
		console.log('给父亲传值')
      this.$emit('myEven', this.num);  
    }  
  },
   beforeCreate() {
   	console.log('实例已经开始了初始化了')
	console.log(this.num)
   }
}  
</script>

<style>

</style>